package org.jeecg.modules.middleware.rabbitmq.delay.tl;

import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.paycenter.channel.tonglian.TongLianMemberService;
import org.jeecg.modules.paycenter.channel.tonglian.TongLianWalletService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TlDelayHandler {

    @Autowired
    private TongLianWalletService walletService;

    public void handle(TlDelayMessageType msgType, String msg) {
        switch (msgType){
            case CUSTOMER_RECHARGE_ORDER_EXPIRE:{
                //货主充值订单有效期检查
                String merOrderNo = msg;
                walletService.CheckCustomerRechargeRecordExpire(merOrderNo);
                return;
            }
            case TEST: {
                System.out.print(DateUtils.getDateStr());
                System.out.println(":msgType=" + msgType.getMsgType() + ",msg=" + msg);
                return;
            }
            default:
                return;
        }

    }

}
